home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: Error: FILE *rl_instream = stdin; initializer is not a constant
- Date: 08 Feb 1996 23:50:37 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Feb8165037@qcd.lanl.gov>
- References: <4fbenh$60s@news1.sympatico.ca>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: Stephane Lajeunesse's message of 8 Feb 1996 00:05:05 GMT
-
- In article <4fbenh$60s@news1.sympatico.ca> Stephane Lajeunesse
- <slajeunesse@sympatico.ca> writes:
- <snip>
- When I'm comiling this using GCC 2.5.8 on Xenix, this type of
- initialization doesn't work:
-
- FILE *rl_inputstream = stdin;
-
- It halts with a message :
-
- initializer is not a constant
-
- Any ideas on how I can work around this problem.
-
- Program in C? :-)
-
- Seriously, what do you mean by `work around the problem'. An
- implementation is allowed to delay deciding what stdin at least till
- your program starts. If you use it for an initializer for a variable
- which becomes defined only within some block (e.g. main), you should
- be fine.
-
- (You still cannot use it to initialize an element of an array or
- struct etc.)
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-